﻿using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using log4net.Core;
using System.IO;

namespace Log4NetDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            var configFileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "config", "Log4Net.config");
            ILog log = LogHelper.GetInstance(configFileName);
            try
            {
                int b = 0;
                var a = 1 / b;
            }
            catch (Exception ex)
            {
                log.Error("ex", ex);
            }

            Console.ReadKey();
        }
    }


}
